{% import 'apostrophe-ui:components/dropdowns.html' as dropdowns with context -%}
{%- macro listMenu() -%}
  <li href="#" class="apos-dropdown-item" data-apos-edit-{{ data.options.name | css }}="{{ data.user._id }}">{{ __ns('apostrophe', 'Edit Account') }}</li>
  <li href="#" class="apos-dropdown-item" data-apos-logout>{{ __ns('apostrophe', 'Logout') }}</li>
{%- endmacro -%}
{%- if data.permissions.edit -%}
  <div class="apos-admin-bar-item">
    <div class="apos-admin-bar-item">
      {{ dropdowns.base({ label: 'Account', items: [] },
        'admin',
        { direction: 'down', listMacro: listMenu }
      ) }}
    </div>
  </div>
{%- endif -%}
